package com.example.demo.controller;

import javax.servlet.http.HttpServletRequest;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import com.example.demo.repository.OrderDao;
import com.jiangwz.boot.starter.PersonService;
import com.jiangwz.utils.RedisUtil;

import lombok.extern.slf4j.Slf4j;

/**
 * @author jiangwz
 * @create 2018/12/28.
 */
@RestController()
@RequestMapping
@Slf4j
public class HelloController {

    @Autowired
    private PersonService personService;

    @RequestMapping("/hello")
    public String hello(HttpServletRequest request){
        return "hi hello2 ";
    }

    @GetMapping("/test")
    public Object test(){
        return personService.getName();
    }


    @Autowired
    private OrderDao orderDao;
    @Autowired
    private RedisUtil redisUtil;

}
